//
//  ScanViewController.h
//  POS
//
//  Created by sigma xu on 4/17/13.
//  Copyright (c) 2013 sigma xu. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <sqlite3.h>
#import "DTDevices.h"
#import "AppDelegate.h"

@interface ScanVC : UIViewController<UITableViewDelegate,UITableViewDataSource>{
    NSString * so_id;
    IBOutlet UITextField *barcode;
    IBOutlet UILabel *product_name;
    IBOutlet UILabel *product_brand;
    IBOutlet UILabel *price;
    IBOutlet UILabel *quantity;
    IBOutlet UILabel *unit_display;
    IBOutlet UILabel *product_package;
    double total_amount;
    BOOL new_client_flag;
    NSInteger max_quantity;
    NSMutableArray *sv_item_list;
    NSString *remark;
    int last_so_id;
    
    sqlite3 *posDB;
    NSString *databasePath;
    
    DTDevices* dtdev;
    NSMutableString *status;
	NSMutableString *debug;
    IBOutlet UITextView *displayText;
    IBOutlet UIImageView *statusImage;
}

@property(nonatomic, retain) NSString * so_id;
@property(nonatomic, retain) UITextField *barcode;
@property(nonatomic, retain) UILabel *product_name;
@property(nonatomic, retain) UILabel *product_brand;
@property(nonatomic, retain) UILabel *price;
@property(nonatomic, retain) UILabel *quantity;
@property(nonatomic, retain) UILabel *unit_display;
@property(nonatomic, retain) UILabel *product_package;
@property(nonatomic, retain) NSMutableArray *sv_item_list;

@property(nonatomic) double total_amount;
@property(nonatomic) BOOL new_client_flag;

@property (assign) bool suspendDisplayInfo;

-(IBAction)button_number:(id)sender;
-(IBAction)button_delete;
-(IBAction)button_order;
-(IBAction)button_reset;
-(IBAction)button_unit;
-(IBAction)button_OK;

-(void)calculate_total_amount;
-(IBAction)barcode_input;

@end